package com.zach.common.entity;

import java.io.Serializable;
import java.util.Collections;
import java.util.List;
/**
 * 用户功能树
 * @author John
 *
 */
public class UserFunctionTree implements Serializable {
	private static final long serialVersionUID = -4441536814333839520L;
	private String id;
	private String name;
	private String remark;
	private Integer level = 0;
	private String parentId;
	private String visible ="1";
	private String isLeave = "1";
	private String funType = "1";
	private Integer viewIndex = 1;
	/**查询时用，所属用户id*/
	private String userId;
	/**查询时用，所属角色id*/
	private String roleId;
	/**
	 * 节点图标
	 */
	private String iconCls;
	private String url;
	//以下属性是手工加入的，不是自动从数据库中获取的，需求手工获取
	private List<UserFunctionTree> subTree;
	private UserFunctionTree parent;
	@SuppressWarnings("unchecked")
	public UserFunctionTree(){
		subTree = Collections.EMPTY_LIST;
	}
	/**
	 * 功能类型 备用
	 * @return
	 */
	public String getFunType() {
		return funType;
	}
	public String getIconCls() {
		return iconCls;
	}
	/**
	 * 唯一id
	 * @return
	 */
	public String getId() {
		return id;
	}
	/**
	 * 是否是子节点，默认为1
	 * @return
	 */
	public String getIsLeave() {
		return isLeave;
	}
	/**
	 * 层级
	 * @return
	 */
	public Integer getLevel() {
		return level;
	}
	/**
	 * 显示名称
	 * @return
	 */
	public String getName() {
		return name;
	}
	public UserFunctionTree getParent() {
		return parent;
	}
	/**
	 * 隶属节点id
	 * @return
	 */
	public String getParentId() {
		return parentId;
	}
	/**
	 * 备注、说明、描述文本
	 * @return
	 */
	public String getRemark() {
		return remark;
	}
	public String getRoleId() {
		return roleId;
	}
	public List<UserFunctionTree> getSubTree() {
		return subTree;
	}
	public String getUrl() {
		return url;
	}
	public String getUserId() {
		return userId;
	}
	/**
	 * 显示顺序
	 * @return
	 */
	public Integer getViewIndex() {
		return viewIndex;
	}
	
	public String getVisible() {
		return visible;
	}
	public void setFunType(String funType) {
		this.funType = funType;
	}
	public void setIconCls(String iconCls) {
		this.iconCls = iconCls;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	public void setIsLeave(String isLeave) {
		this.isLeave = isLeave;
	}
	public void setLevel(Integer level) {
		this.level = level;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	public void setParent(UserFunctionTree parent) {
		this.parent = parent;
	}
	
	public void setParentId(String parentId) {
		this.parentId = parentId;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}
	public void setSubTree(List<UserFunctionTree> subTree) {
		this.subTree = subTree;
	}
	
	public void setUrl(String url) {
		this.url = url;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	public void setViewIndex(Integer viewIndex) {
		this.viewIndex = viewIndex;
	}
	public void setVisible(String visible) {
		this.visible = visible;
	}
	@Override
	public String toString() {
		return id+" "+name+visible;
	}
}
